package io.gitee.twoke.generator.engine.impl.metadata.impl;

import io.gitee.twoke.generator.engine.impl.metadata.TableColumn;
import lombok.Builder;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

@Data
@Builder
public class TableColumImpl implements TableColumn {
    private String name;
    private int dataType;
    private String comment;
    private String defaultValue;
    private boolean isPrimaryKey;
    private boolean isRequired;

    @Override
    public JdbcType getJdbcType() {
        return JdbcType.forCode(dataType);
    }
}
